/*
 * =====================================================================================
 *
 *       Filename:  
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  06/04/14 10:01:41
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Andy (gk), andy_y_li@163.com
 *        Company:  RD
 *
 * =====================================================================================
 */


#ifndef _MYHEAD_H
#define _MYHEAD_H

#include <stdio.h>

#define	_toupper(c)		(((c) >='a' && (c) <= 'z')?((c) + 'A' - 'a'):(c))
#define	_tolower(c)	(((c) >='A' && (c) <= 'Z')?((c) + 'a' - 'A'):(c))
#define	oops(m,x)	{perror((m));exit((x));}

#define LENGTH(var,type) (sizeof(var) / sizeof(type))

typedef int Status;
#define	OK	0
#define	ERROR	1

void opps(char *s1,char *s2);
void TurnToupper(char * str);
void TurnTolower(char * str);
void ClearBuffer();
char *Get_cmd(char *prompt,FILE *fp);
char **splitline(char *line);
void freelist(char **list);
FILE *diy_popen(const char *cmd,const char *mode);

#endif


